package cn.script.common;

import cn.script.opt.DmSoft;

/**
 * @author 周永波
 */
public class GlobalCnst {

    public final static DmSoft DM_SOFT = new DmSoft();


    public static void waitKey(String key) {
        DM_SOFT.waitKey(key);
    }

    /**
     * 根据ID 获取角色名称
     *
     * @param hwnd
     * @return
     */
    public static synchronized String getName(long hwnd) {
        DM_SOFT.bindWindowNormal(hwnd);
        String name = DM_SOFT.ocr(89, 35, 193, 55, "f8e000", 1.0);
        DM_SOFT.unWindow();
        return name;
    }
}
